/*******************************************************************************
 * Copyright (c) 2005, 2014 springside.github.io
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 *******************************************************************************/
package net.wofly.sale.commodity.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import net.wofly.sale.commodity.domain.CommodityType;

public interface CommodityTypeRepository
		extends PagingAndSortingRepository<CommodityType, String>, JpaSpecificationExecutor<CommodityType> {
	
	@Query(value = "select c from CommodityType c where commodityTypeID < '1999' and commodityTypeID > '10' and status = 1")
	public List<CommodityType> findJiuMaoCommodityType() ;
	
	@Query(value = "select max(commodityTypeID) from CommodityType c where commodityTypeID < '1999' and commodityTypeID > '10'")
	public String getMaxCommodityID() ;
	
	

}